Table of Contents

Heartbeat Event

Function Introduction

  Timed heartbeat sending

illustrate

Request Message Style

{
    "operator": "heartbeat",
    "sessionId": "SID:1234567890-000001",
    "messageId": "MID:localhost-122334455667-12232323232323-000001",
    "deviceInfo": {
        "serialNumber": "I320013590DEA0BE21F6958",
        "IP": "192.168.1.233",
        "MAC": "5a:58:12:7f:23:a2",
        "SN": "I320315D7248CAA258793D9",
        "DID": "IOTBEE-274996-YPHPK",
        "deviceType": "0x0002",
        "deviceVersion": "V1.0.0"
    },
    "info": {
        "eventId": 1,
        "time": "20200331T101001+08",
        "platformID": "64010000001110000001",
        "strategyVersion": "v1.0.0"
    }
}

Request Message Parameters

Message Field Name describe Required or not
deviceInfo
  serialNumber Equipment serial number yes
  platformID Platform ID no
  IP Device IP yes
  MAC Device MAC yes
  DID Device DID no
  deviceType Device Type yes
  deviceVersion Device version yes
info
  eventId Event ID, for the same event, the ID is the same yes
  time The time of the event occurrence, in accordance with the ISO 8601 time format, refers to the combination representation of date and time introduced in the ISO 8601 standard that must be read before use yes
  strategyVersion Policy Version yes

Response Message Style

{
    "operator": "heartbeat-Ack",
    "info": {
        "eventId":1,
        "time":"20200331T101002+08",
        "heartbeatInterval":1,
        "eventSendMode":"realTime",
        "strategy":
        {
            "passengerStaticsInterval": 2,
            "heartBeatInterval": 30,
            "isEnableElectronicDefence": true,
            "isCrossBorderDetectEnable": true,
            "isOffDutyDetectEnable": true,
            "isPassengerFlowStaticsEnable": true,
            "isCryScreamDetectEnable": true,
            "isPetDetectEnable": true,
            "isFallDetectEnable": true,
            "isSnapshotEnable": true,
            "isPersonInfoEnable": true,
            "isPersonDetectEnable": true,
            "isCarLicenseSnapshotEnable": true,
            "isCarDetectEnable": true,
			"isTimedSnapshotEnable": true,
			"isGroundLockStatusChangedEnable": true,
			"isMotionDetectEnable": true,
			"isTrafficStatisticsEnable": true,
			"isTrafficStatisticsCarShapeEnable": true,
			"isLicensePlateSurveillanceEnable": true,
			"isFireDetectEventEnable": true,
			"isVideoCoverEventEnable": true,
			"isElectricBikeEventEnable": true,
			"isGasContainerEventEnable": true,
			"isElectronicDefenceV2EventEnable": true
			"isPeopleStatisticsPeriodEventEnable": true
			"isPeopleStatisticsTriggerEventEnable": true
        }
    },
    "result": {
        "errorNo": 0,
        "description": "ok"
    }
}

Response message parameters

Message Field Name describe Required or not
info yes
  eventId Event ID, for the same event, the ID is the same yes
  time Server time, in accordance with ISO 8601 time format, referring to the combination representation of date and time introduced in the ISO 8601 standard before use.

When the time between the server and device exceeds a certain range (which needs to be confirmed), this parameter needs to be returned. After receiving this time value, the device will call the time modification command of the middle layer to synchronize the time (the protocol needs to add a special print message for marking)
no
  heartbeatInterval Heartbeat interval, in seconds no
  eventSendMode Event sending mode.

realTime - Real time event priority (default): When a real-time event arrives, if there are no events being sent, send the real-time event directly. If there are events being sent, wait until the event is sent, and then send the real-time event again;

Retransmission - Priority for retransmission events: After the retransmission event is completed, real-time events will be sent again
yes
  strategy strategy no
   passengerStaticsInterval Passenger flow statistics interval, in hours yes
   heartBeatInterval Heartbeat interval, in seconds yes
   isEnableElectronicDefence Is it possible to report electronic fence events; True - Yes, false - No yes
   isCrossBorderDetectEnable Is it possible to report cross-border detection events; True - Yes, false - No yes
   isOffDutyDetectEnable Is it possible to report off duty detection incidents; True - yes, false - no yes
   isPassengerFlowStaticsEnable Is it possible to report passenger flow statistics events; True - Yes, false - No yes
   isCryScreamDetectEnable Is it possible to report crying and crying detection events; True - Yes, false - No yes
   isPetDetectEnable Is it possible to report pet testing events; True - Yes, false - No yes
   isFallDetectEnable Is it possible to report a fall detection event; True - Yes, false - No yes
   isSnapshotEnable Is it possible to report facial capture events; True - Yes, false - No yes
   isPersonInfoEnable Is it possible to report facial recognition events; True - Yes, false - No yes
   isPersonDetectEnable Is it possible to report human form detection events; True - Yes, false - No yes
   isCarLicenseSnapshotEnable Is it possible to report human form detection events; True - Yes, false - No yes
   isCarDetectEnable Is it possible to report vehicle shape detection events; True - Yes, false - No yes
   isTimedSnapshotEnable Is it possible to report timed snapshot events; True - Yes, false - No yes
   isGroundLockStatusChangedEnable Is it possible to report groundlock status changed events; True - Yes, false - No yes
   isMotionDetectEnable Is it possible to report motion detection events; True - Yes, false - No yes
   isTrafficStatisticsEnable Is it possible to report traffic statistics events; True - Yes, false - No yes
   isTrafficStatisticsCarShapeEnable Is it possible to report traffic statistics car shape events; True - Yes, false - No yes
   isLicensePlateSurveillanceEnable Is it possible to report license plate surveillance events; True - Yes, false - No yes
   isFireDetectEventEnable Is it possible to report fire detection events; True - Yes, false - No yes
   isVideoCoverEventEnable Is it possible to report video cover events; True - Yes, false - No yes
   isElectricBikeEventEnable Is it possible to report electric bike events; True - Yes, false - No yes
   isGasContainerEventEnable Is it possible to report gas container events; True - Yes, false - No yes
   isElectronicDefenceV2EventEnable Is it possible to report electronic fence V2 events; True - Yes, false - No yes
   isPeopleStatisticsPeriodEventEnable Is it possible to report people count periodic event; True - Yes, false - No yes
   isPeopleStatisticsTriggerEventEnable Is it possible to report people count trigger event; True - Yes, false - No yes